home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun: Game Pak
/
rerun-gamepak
/
chopper run
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
6KB
|
182 lines
100 rem ******************************
110 rem * chopper run *
115 rem * *
120 rem * written by h. campbell *
130 rem * *
140 rem ******************************
150 :
160 :
165 poke53281,0 :poke53280,0
170 gosub20000
200 v=53248 : rem v=vicii starting address
202 s=54272 : rem s=sid starting address
204 dn$="[155]^":sr$=""
210 fori=stos+24:pokei,0:next : rem clear sid
220 mx=0
230 fori=1009to1013:reada:pokei,a:next
235 data0,0,3,1,2
242 ::fori=828to991:reada:pokei,a:nexti : rem poke ml joystick reader
243 ::fori=0to319
244 ::reada: rem get sprite data
245 ::pokei+12288,a : rem place data at 12288 on
246 ::nexti
247 print"[147][158]do you want details? y[146]es or n[146]o":poke198,0
248 geta$:ifa$<>"y"anda$<>"n"then248
249 ifa$="y"thengosub30000
250 poke2040,192 : rem point sprite 0 data pointer to 12288
251 gosub 1000
252 sc=0:ch=0:ct=0:di=0:hi=0
254 pokes+1,8 : pokes+6,128 : pokes+24,15
270 pokev+39,6 : rem set sprite 0 color
272 pokev+37,1 : rem multi-color 1
273 pokev+38,15 : rem multi-color 2
275 poke53276,3 : rem set mobs to multi-color
280 pokev+1,200 : pokev,155 : pokev+16,0
281 pokev+2,120 : pokev+3,255
282 poke2041,196 : rem point sprite 1 data pointer
283 pokev+40,10 : rem set sprite 1 color
284 a=peek(v+31) : rem clear spr/chr collision register
285 a=peek(v+30) : rem clear spr/spr collision register
286 pokev+21,3 : rem turn on sprites
288 sys 937
294 print"[147]";:gosub500
295 pokes+24,0 : pokev+21,0
300 print"[147]distance[158]"di
302 ifdi>mxthenmx=di
305 printspc(20)"[145]max. dist[158]"mx
310 print"would you like to play again?"
320 input" y[157][157][157]";a$
330 ifa$="y"then250
340 print"[147]";:end
400 run
410 :
420 :
500 rem ////////////////
510 rem / main routine /
520 rem ////////////////
530 :
534 ic=.005
535 s1=129:s0=128:po=218:pe=143:f=2
536 di$="distance[158]":sc$="[157][148]"
540 print"[147][149][209][209] [209][145] [209][209] [209][209][209] [209][209] [209][209][209][145][145][209][209] [209][209][145][209] [145][145][145][209][209]"
542 print" [209][145][145]"
545 print"[209] [209] [145][145][145][145][145][145][209] [209] [209] [145][145][145][145][145][145][209] [209]"
550 pokes+4,s1:di=di+sp
560 fori=1tosk:next
575 ifpeek(v+30)thengosub940:return
580 pokes+4,s0:printdi$;di;sc$:pokepo,pe
610 cl=peek(v+31):if(cland1)=1thengosub900:return
615 ifclthenpoke2041,0:pokev+3,255:poke2041,196
635 pokev+3,peek(v+3)-f:f=f+ic:ifpeek(v+3)<25thenpokev+3,255
638 ifpeek(v+1)<55thengosub940:return
640 goto 550
650 :
900 rem //////////////////////////////
910 rem / mob/mob collision response /
920 rem //////////////////////////////
930 :
940 poke985,0
950 pokes+1,2:pokes+4,129
955 fori=1to300:nexti
958 poke985,192
960 return
970 :
1000 rem ///////////////
1010 rem / skill level /
1020 rem ///////////////
1030 :
1040 print"[147]press the desired skill level number."
1050 print"0 = hardest ; 5 = easiest" : poke198,0
1060 geta$:ifa$=""then1060
1070 sk=val(a$):ifsk>5then1060
1075 sp=6-sk
1080 sk=sk*10
1090 return
1100 :
2000 rem ///////////////////////////
2010 rem / ml joystick reader data /
2020 rem ///////////////////////////
2030 :
2040 data173,0,220,74,176,3,206,1,208,74,176,3,238,1,208,74,176,42,173,0,208,208
2041 data31,173,16,208,41,1,208,16,173,16,208,9,1,141,16,208,169,80,141,0,208,76
2042 data182,3,173,16,208,41,252,141,16,208,206,0,208,76,182,3,74,176,32,238,0,208
2043 data240,30,169,80,205,0,208,208,20,173,16,208,41,1,240,13,173,16,208,41,252
2044 data141,16,208,169,0,141,0,208,76,182,3,173,16,208,9,1,141,16,208,76,182,3,120
2045 data169,60,141,20,3,169,3,141,21,3,88,96,173,16,208,41,1,240,5,9,2,141,16,208
2046 data173,0,208,141,2,208,173,241,3,24,105,1,41,3,141,241,3,170,189,242,3,24,105
2047 data192,141,248,7,76,49,234
2120 :
9000 rem ///////////////
9010 rem / sprite data /
9020 rem ///////////////
9030 :
9031 data000,000,000,000,016,000,000,084
9032 data000,000,084,000,000,168,000,002
9033 data170,000,255,255,252,002,170,000
9034 data002,170,000,000,168,000,000,032
9035 data000,000,032,000,000,032,000,000
9036 data032,000,000,032,000,000,032,000
9037 data003,032,000,003,160,000,003,000
9038 data000,000,000,000,000,000,000,006
9039 data000,000,000,000,048,000,000,116
9040 data000,000,116,000,000,184,000,002
9041 data186,000,002,186,000,002,186,000
9042 data002,186,000,000,184,000,000,048
9043 data000,000,048,000,000,032,000,000
9044 data032,000,000,032,000,000,032,000
9045 data003,032,000,003,160,000,003,000
9046 data000,000,000,000,000,000,000,006
9047 data000,000,000,192,016,000,048,084
9048 data000,012,084,000,003,168,000,002
9049 data234,000,002,186,000,002,174,000
9050 data002,171,000,000,168,192,000,032
9051 data048,000,032,012,000,032,000,000
9052 data032,000,000,032,000,000,032,000
9053 data003,032,000,003,160,000,003,000
9054 data000,000,000,000,000,000,000,006
9063 data000,000,000,000,016,012,000,084
9064 data048,000,084,192,000,171,000,002
9065 data174,000,002,186,000,002,234,000
9066 data003,168,000,012,168,000,048,032
9067 data000,192,032,000,000,032,000,000
9068 data032,000,000,032,000,000,032,000
9069 data003,032,000,003,160,000,003,000
9070 data000,000,000,000,000,000,000,006
9071 data032,000,000,168,000,000,168,000
9072 data000,032,000,000,032,000,000,032
9073 data000,000,032,000,000,168,000,000
9074 data168,000,000,136,000,000,184,000
9075 data000,048,000,000,048,000,000,048
9076 data000,000,000,000,000,000,000,000
9077 data000,000,000,000,000,000,000,000
9078 data000,000,000,000,000,000,000,255
20000 rem //////////////
20005 rem / title page /
20010 rem //////////////
20015 :
20020 print"[147]"spc(13)"[158]chopper run"
20030 printspc(10)"by howard campbell"
20040 return
20050 :
30000 rem ////////////////
30002 rem / objective ///
30004 rem ////////////////
30005 :
30009 print"[147][158]you are the pilot of a reconnaissance
30010 [153]"chopper trapped behind enemy lines.
30020 print"to evade certain destruction you must
30030 [153]"fly less than ten feet off the ground.
30040 print"you will have to avoid various ground
30050 [153]"projections or face the possiblility of
30060 print"crashing.
30070 [153]"you must evade heat-seeking missiles,"
30080 [153]"which are constantly launched to inter-"
30090 [153]"cept you. the only certain way to shake";
30100 [153]"these missiles off your tail is to force";
30110 [153]"them to strike a ground projection.
30120 print"place joystick in port 2 to control your chopper.
30140 [153]" printgood luck!!!wait
30150 print" [158]press <space> to continue[146]";
30160 geta$:ifa$=""then30160
30170 return